const api = require("../../request/api")
const request = require("../../request/request")
const util = require("../../utils/util")
const App = getApp();

// pages/good/xomment.js
Page({

    /**
     * 页面初始数据
     */
    data: {
        barHeight: App.globalData.paddingTop,

        styledata: {
            "bg_color": "white",
            "color": "#000",
            "leftflag": true,
            "homeflag": true,
            "name": "商品评论"
        },

        // 是否点赞 目前仅测试
        isagree: false,
        agreeNum: 0,

        isShowCcomment: false,
        if_show_mask: false
    },

    // 拉起回复框
    showCbox() {
        this.setData({
            if_show_mask: true,
            isShowCcomment: true
        })
    },

    // 收起回复
    closeCommentBox() {
        this.setData({
            if_show_mask: false,
            isShowCcomment: false
        })
    },

    // 点赞评论
    addAgree() {
        util.showToast('讲的真好赞一个')
        this.setData({
            agreeNum: 1,
            isagree: true
        })
    },

    // 点击遮罩关闭弹出框
    clear_mask() {
        this.setData({
            if_show_mask: false,
            isShowCcomment: false,
        })
    },
})